package com.ruoyi.admin.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.admin.mapper.SensorMapper;
import com.ruoyi.admin.domain.Sensor;
import com.ruoyi.admin.service.ISensorService;

/**
 * 传感器数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-14
 */
@Service
public class SensorServiceImpl implements ISensorService 
{
    @Autowired
    private SensorMapper sensorMapper;

    /**
     * 查询传感器数据
     * 
     * @param id 传感器数据主键
     * @return 传感器数据
     */
    @Override
    public Sensor selectSensorById(Long id)
    {
        return sensorMapper.selectSensorById(id);
    }

    /**
     * 查询传感器数据列表
     * 
     * @param sensor 传感器数据
     * @return 传感器数据
     */
    @Override
    public List<Sensor> selectSensorList(Sensor sensor)
    {
        return sensorMapper.selectSensorList(sensor);
    }

    /**
     * 新增传感器数据
     * 
     * @param sensor 传感器数据
     * @return 结果
     */
    @Override
    public int insertSensor(Sensor sensor)
    {
        return sensorMapper.insertSensor(sensor);
    }

    /**
     * 修改传感器数据
     * 
     * @param sensor 传感器数据
     * @return 结果
     */
    @Override
    public int updateSensor(Sensor sensor)
    {
        return sensorMapper.updateSensor(sensor);
    }

    /**
     * 批量删除传感器数据
     * 
     * @param ids 需要删除的传感器数据主键
     * @return 结果
     */
    @Override
    public int deleteSensorByIds(Long[] ids)
    {
        return sensorMapper.deleteSensorByIds(ids);
    }

    /**
     * 删除传感器数据信息
     * 
     * @param id 传感器数据主键
     * @return 结果
     */
    @Override
    public int deleteSensorById(Long id)
    {
        return sensorMapper.deleteSensorById(id);
    }
}
